import json

import scrapy


class ExecltSpider(scrapy.Spider):
    name = "execlt"

    async def start(self):
        for i in range(1,21):
            yield scrapy.Request(f'https://www.mashangpa.com/api/problem-detail/1/data/?page={i}' , cookies={
                "sessionid":'c2c0r9a78t06ayczmhx5cvj00xukfgcq',
            },
            callback=self.parse)

    async def parse(self, response):
        data = json.loads(response.text)

        print(data)

